﻿using MusicExplorer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.Storage;

namespace MusicExplorer.Repository
{
    public abstract class RepositoryBase
    {
        private static RepositoryBase s_instance;
        public static RepositoryBase GetInstance(string className)
        {
            if (s_instance == null)
                s_instance = (RepositoryBase)Activator.CreateInstance(
                    Type.GetType(string.Format("MusicExplorer.Repository.{0}", className)));
            return s_instance;
        }

        public abstract Task<List<Track>> DecodeTracks(string source);
    }
}
